﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Weixin.MP.DAL.WeixinMP;
using Weixin.MP.UI;

namespace Weixin.MP.Web.Controllers
{
    public class HomeController : BaseController
    {
        protected override void CheckUserLogin(ActionExecutingContext filterContext)
        {
            if (Session[Common.LoginUserSession] == null)
            {
                //阻止Action执行
                filterContext.Result = new HttpUnauthorizedResult();
                //RedirectToAction("Index","Login");
                Response.Redirect("Login");
                //Response.End();
            }
            else
            {
                LoginUser = Session[Common.LoginUserSession] as UsersEO;
            }
        }

        public ActionResult Index()
        {

            return View(this.LoginUser);
        }


    }
}
